<%@ page language="java" pageEncoding="ISO-8859-1"%>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>   
    <title>Search VM</title>
    <%
    	if(session.getAttribute("username")==null||session.getAttribute("username").toString().equals(""))
    	{
    		response.sendRedirect(request.getContextPath()+"/login.html");
    		return;
    	}
    %>  
    
     <style type="text/css" title="currentStyle">
        @import "../../JavaScript/DataTables/media/css/demo_page.css";
        @import "../../JavaScript/DataTables/media/css/demo_table_jui.css";
        @import "../../JavaScript/DataTables/examples/examples_support/themes/smoothness/jquery-ui-1.8.4.custom.css"; 
        @import "../../JavaScript/DataTables/extras/TableTools/media/css/TableTools.css";
        @import "../../JavaScript/DataTables/extras/ColReorder/media/css/ColReorder.css";
        @import "../../JavaScript/DataTables/extras/ColVis/media/css/ColVis.css";
        .ColVis {
				float: left;
				margin-bottom: 0
			}
			.dataTables_length {
				width: auto;
			}
  </style>
    	
  <script src="../../JavaScript/jquery-1.6.4.js"></script>
  <script src='../../JavaScript/AutoComplete/jquery.bgiframe.min.js'></script> 
  <script src='../../JavaScript/AutoComplete/jquery.ajaxQueue.js'></script> 
  <script src='../../JavaScript/AutoComplete/thickbox-compressed.js'></script> 
  <script src='../../JavaScript/AutoComplete/jquery.autocomplete.js'></script>
  <script src='../../JavaScript/AutoComplete/localdata.js'></script>	 
  <link rel="stylesheet" type="text/css" href="../../JavaScript/AutoComplete/css/jquery.autocomplete.css" /> 
  <link rel="stylesheet" type="text/css" href="../../JavaScript/AutoComplete/css/thickbox.css" />
  <script src="../../JavaScript/DataTables/media/js/jquery.dataTables.js"></script>
  <script src="../../JavaScript/DataTables/extras/TableTools/media/js/ZeroClipboard.js"></script>  
  <script src="../../JavaScript/DataTables/extras/TableTools/media/js/TableTools.js"></script>
  <script src="../../JavaScript/DataTables/extras/ColReorder/media/js/ColReorder.js"></script>
  <script src="../../JavaScript/DataTables/extras/ColVis/media/js/ColVis.js"></script>
  <script src="../../JavaScript/JqueryUI/development-bundle/external/jquery.bgiframe-2.1.2.js"></script> 
  <script src="../../JavaScript/JqueryUI/development-bundle/ui/jquery.ui.core.js"></script> 
  <script src="../../JavaScript/JqueryUI/development-bundle/ui/jquery.ui.widget.js"></script> 
  <script src="../../JavaScript/JqueryUI/development-bundle/ui/jquery.ui.mouse.js"></script> 
  <script src="../../JavaScript/JqueryUI/development-bundle/ui/jquery.ui.button.js"></script> 
  <script src="../../JavaScript/JqueryUI/development-bundle/ui/jquery.ui.draggable.js"></script> 
  <script src="../../JavaScript/JqueryUI/development-bundle/ui/jquery.ui.position.js"></script> 
  <script src="../../JavaScript/JqueryUI/development-bundle/ui/jquery.ui.resizable.js"></script> 
  <script src="../../JavaScript/JqueryUI/development-bundle/ui/jquery.ui.dialog.js"></script> 
  <script src="../../JavaScript/JqueryUI/development-bundle/ui/jquery.effects.core.js"></script> 
  <script src="../../JavaScript/jquery.alphanumeric.js"></script>
  <script src="../../JavaScript/SearchVM.js"></script>
  <script src="../../JavaScript/jquery.poshytip.js"></script>
  <link rel="stylesheet" href="../../JavaScript/tip-yellowsimple/tip-yellowsimple.css" type="text/css" />
  </head>
  
  <body>
  	 <div><br><span> VM&Product Search 
  	</span>
  </div>
  <div class="line"></div>
  <div class="tab">
    <br>
   	<hr>
    <br>
  </div>
  		<!--查询条件 -->
    	<div class="main">
    	<form id="form1">
    	<label>Please select one (or more) of the below to perform search:</label>
    	<table>
		<tr>
			<td>VM Model</td>
			<td><select name="model" id="model"><option>All</option></select></td>
			<td>Venue Type</td>
			<td><select name="venue_type" id="venue_type"><option>All</option></select></td>
			<td>City of VM</td>
			<td><select name="city" id="city"><option>All</option></select></td>
			<td>Region of VM</td>
			<td><select name="region" id="region"><option>All</option></select></td>
		</tr>
		</table>
		<label>OR</label><br/>
		<label>Please enter one of the following code</label><br/>
		<table>
		<tr>
			<td>QBX Number</td>
			<td><input type="text" name="qbx_number" id="qbx_number"/></td>
			<td>Alona Number</td>
			<td><input type="text" name="alona_number" id="alona_number"/><td>
			<td>Venue Code</td>
			<td><input type="text" name="venue_code" id="venue_code"/></td>
		</tr>
		</table>
		<button type="button" id="search">Search</button>
		<button type="reset" id="reset">Reset</button>
		</form>
		</div>
		
	<!--VM信息显示 -->
    <form id="form2">
			<table cellpadding="0" cellspacing="0" border="0" class="display" id="content" style="display:none">
			<thead>
				<tr>
					<th><input type="checkbox" id='selectAll'></input>&nbsp;<a href='#' id='delete'>Delete All</a></th>
					<th>QBX Number</th>
					<th>Alona Number</th>
					<th>Number of Aisles</th>
					<th>Model</th>
					<th>Venue Code</th>
					<th>Venue Type</th>
					<th>Number of Units</th>
					<th>City of VM</th>
					<th>Region of VM</th>
					<th>Edit</th>
				</tr>
			</thead>
			<tbody id="VM_Content">

			</tbody>
			</table>	
    </form>
    
     <!--VM信息更新 -->
	<div id="dialog-form1" title="Delete Product Information"> 
	<p class="validateTips">All form files are required.</p> 
	<form id="form3">
  		<table>
  			<tr><td><input type="text" name="s_id" id="s_id" style="display:none"/></td></tr>
  			<tr><td>QBX Number:</td>
  			<td><input type="text" name="s_qbxNumber" id="s_qbxNumber"/><font color="red" id="f0"></font></td></tr>
			<tr><td>Alona Number:</td>
			<td><input type="text" name="s_alonaNumber" id="s_alonaNumber"><font color="red" id="f1"></font></td></tr>
			<tr><td>Number of Aisles:</td>
			<td><input type="text" name="s_aisles" id="s_aisles"/>Enter Number</td></tr>
			<tr><td>Model:</td>
			<td><input type="text" name="s_model" id="s_model"/></td></tr>
			<tr><td>Venue Code:</td>
			<td><input type="text" name="s_code" id="s_code"/><font color="red" id="f2"></font></td></tr>
			<tr><td>Venue Type:</td>
			<td><input type="text" name="s_type" id="s_type"/></td></tr>
			<tr><td>Number of Units:</td>
			<td><input type="text" name="s_unit" id="s_unit"/>Enter Number</td></tr>
			<tr><td>City of VM:</td>
			<td><input type="text" name="s_city" id="s_city"/></td></tr>
			<tr><td>Region of VM:</td>
			<td><input type="text" name="s_region" id="s_region"/></td></tr>
		</table>	
	</form>
	</div>
	
	<!--VM信息删除-->
	<div id="dialog-form2" title="Delete VM Information"> 
	<input type="text" name="id" id="d_id" style="display:none"/>
	<p class="validateTips">If you continue,all the information about this VM will be deleted</p> 
	</div>
	
	<!--删除多项提示-->
	<div id="dialog-form3" title="Delete VM Information"> 
	<input type="text" name="id" id="da_id" style="display:none"/>
	<p class="validateTips"></p> 
	</div>
	
	<!--无条件查询提示-->
	<div id="dialog-form4" title="Search VM Information"> 
	<input type="text" name="id" id="n_id" style="display:none"/>
	<p class="validateTips">Do you want to display all VM information?</p> 
	</div>  
	
	<!-- 更新aisles数据 -->
	<div id="dialog-form5" title="Update Aisles Information">  
	<form id="form5">
  		<table id="table5"> 
  			<%
  			for(int i=0;i<7;i++)
  			{
  				out.print("<tr><th></th>");
  				for(int j=1;j<9;j++)
  				{
  					out.print("<th>A"+String.valueOf(i*8+j)+"</th>");
  				}
  				out.print("</tr>");
  				out.print("<tr id='item'><th scope=\"row\">Item</th>");
  				for(int k=1;k<9;k++)
  				{
  					out.print("<td><input type='text' class ='item' id='I"+String.valueOf(i*8+k)+"' name='I"+String.valueOf(i*8+k)+"'/></td>");
  				}
  				out.print("</tr>");
  				out.print("<tr id='price'><th scope=\"row\">Price($)</th>");
  				for(int k=1;k<9;k++)
  				{
  					out.print("<td><input type='text' class='price' id='P"+String.valueOf(i*8+k)+"' name='P"+String.valueOf(i*8+k)+"'/></td>");
  				}
  				out.print("</tr>");
  			}
  		 	%>
		</table>
	</form>
	</div>   
  </body>
</html>